local nya__qingguo = fk.CreateSkill {

  name = "nya__qingguo",

  tags = {  },

}



nya__qingguo:addEffect("viewas", {
  name = "nya__qingguo",
  anim_type = "defensive",
  pattern = "jink,peach",
  interaction = function(self,player)
    local names = {}
    for _, name in ipairs({"jink","peach"}) do
      local card = Fk:cloneCard(name)
      if not (name == "peach" and player:hasSkill("nya__play", true)) then
        if (Fk.currentResponsePattern == nil and player:canUse(card)) or
          (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(card)) then
          table.insertIfNeed(names, name)
        end
      end
    end
    if #names == 0 then return end
    return UI.ComboBox {choices = names}
  end,
  card_filter = function(self, player, to_select, selected)
    if #selected == 1 or not self.interaction.data then return false end
    if self.interaction.data == "jink"  then
      return Fk:getCardById(to_select).color == Card.Black
    elseif not player:hasSkill("nya__play", true) then
      return Fk:getCardById(to_select).name == "jink"
    end
  end,
  view_as = function(self, player,cards)
    if #cards ~= 1 then return end
    local c  = Fk:cloneCard(self.interaction.data)
    c.skillName = nya__qingguo.name
    c:addSubcard(cards[1])
    return c
  end,
  enabled_at_play = function(self, player)
    return not player:hasSkill("nya__play", true) and not player:isNude()
  end,
  enabled_at_response = function(self, player, response)
    return not player:isNude()
  end,
})

return nya__qingguo